package com.yang.library.service.service;


import com.yang.library.bookenum.State;
import com.yang.library.entry.User;

import java.util.List;
import java.util.Map;

/**
 * 用户服务接口，定义了用户相关操作的方法
 */
public interface UserService {

    boolean isRegistered(String username, String password);

    boolean register(User user);

    Map<State, User> login(String username, String password);

    boolean changePassword(String username, String oldPassword, String newPassword);

    boolean updateUser(String username, User user);

    boolean deleteUser(String username);

    List<User> getAllUsers();

    User getUserByName(String username);
}

